In category theory if C is a category and a set-valued functor the category of elements of F (also denoted by ∫CF) is the category defined as follows:
A more concise way to state this is that the category of elements of F is the comma category where is a one-point set. The category of elements of F comes with a natural projection that sends an object (A,a) to A and an arrow to its underlying arrow in C.
Somewhat confusingly in some texts (e.g. Mac Lane, Moerdijk) the category of elements for a presheaf is defined differently. If is a presheaf the category of elements of P (again denoted by or to make the distinction to the above definition clear ∫C P) is the category defined as follows:
As one sees the direction of the arrows is reversed and in fact one can once again state this definition in a more concise manner: the category we just defined is nothing but . Consequentially, in the spirit of adding a "co" in front of the name for a construction to denote its dual, one should rather call this category the category of coelements of P.
For C small, this construction can be extended into a functor ∫C from to , the category of small categories. In fact, using the Yoneda lemma one can show that ∫CP , where is the Yoneda embedding. This isomorphism is natural in P and thus the functor ∫C is naturally isomorphic to .